package com.sptpc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sptpc.domain.Product;
import com.sptpc.persistence.ProductMapper;
//服务层
@Service
public class ProductService {
	//持久层
	@Autowired
	private ProductMapper productMapper;
	
	
	public List<Product> getHotProduct() {
		//服务层调用持久层
		return productMapper.queryAllHotProduct();
	}

	public List<Product> getNewProduct() {
		return productMapper.queryAllNewProduct();
	}
	

	public Product finProductById(String pid) {
		return productMapper.qureyProductById();
	}
}
